Skip to content

ci: raise db pg-max-connections for private cloud e2e#7825

Merged
Zaimwa9 merged 4 commits into
mainfrom
ci/fix-connection-pool-limit
Jun 18, 2026
Merged

ci: raise db pg-max-connections for private cloud e2e#7825
Zaimwa9 merged 4 commits into
mainfrom
ci/fix-connection-pool-limit

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

CI running the private-cloud E2E job has been extremely flaky in the latest days due to too many clients errors

flagsmith-api-1 | psycopg2.OperationalError: connection to server at "db" ... FATAL:  sorry, too many clients already
✘ 14 [firefox] › e2e/tests/project-permission-test.pw.ts:10:7 › Project Permission Tests ... @enterprise (54.1s)
   TimeoutError: locator.waitFor: Timeout 20000ms exceeded   (waiting for #project-settings-link)
  • Added a pg-max-connections input to reusable-docker-e2e-tests
  • Set it to 200 for private-cloud E2E job (following the docs recommendations)
  • No change for OSS

Alternatives

  • set CONN_MAX_AGE=0 to close connections per request. But drifts from production (connections peaked at 70 instead of 100, but still holding idle connections)
  • Reduce concurrency (keeping it in case this is not enough)
  • pgpool as in prod but overkilled imho

How did you test this code?

  • Reproduced locally both the error (concurrency 16, private-cloud image) and the fix
# breakdown at peak: 94 idle and persistent connections
 state  | count
 idle   |   94
 (other)|    5
 active |    1   (psql monitor)

@Zaimwa9 Zaimwa9 requested a review from khvn26 June 18, 2026 15:00
@Zaimwa9 Zaimwa9 requested review from a team as code owners June 18, 2026 15:00
@Zaimwa9 Zaimwa9 requested review from talissoncosta and removed request for a team June 18, 2026 15:00
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jun 18, 2026 5:12pm
flagsmith-frontend-preview Ignored Ignored Preview Jun 18, 2026 5:12pm
flagsmith-frontend-staging Ignored Ignored Preview Jun 18, 2026 5:12pm

Request Review

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard ci-cd Build, test and deployment related labels Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-7825 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-7825 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-7825 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-7825 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7825 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7825 Finished ✅ Results

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.58%. Comparing base (40323e3) to head (5d3d0dc).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7825   +/-   ##
=======================================
  Coverage   98.58%   98.58%           
=======================================
  Files        1465     1465           
  Lines       56889    56889           
=======================================
  Hits        56082    56082           
  Misses        807      807           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.8 seconds
commit  45f14dd
info  🔄 Run: #17641 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.4 seconds
commit  45f14dd
info  🔄 Run: #17641 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

failed  1 failed

Details

stats  1 test across 1 suite
duration  50.7 seconds
commit  45f14dd
info  📦 Artifacts: View test results and HTML report
🔄 Run: #17641 (attempt 1)

Failed tests

firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise

### Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

failed  1 failed

Details

stats  1 test across 1 suite
duration  49.6 seconds
commit  45f14dd
info  📦 Artifacts: View test results and HTML report
🔄 Run: #17641 (attempt 2)

Failed tests

firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise

### Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  41.9 seconds
commit  b740031
info  🔄 Run: #17645 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  45 seconds
commit  b740031
info  🔄 Run: #17645 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

failed  1 failed

Details

stats  1 test across 1 suite
duration  53.1 seconds
commit  b740031
info  📦 Artifacts: View test results and HTML report
🔄 Run: #17645 (attempt 1)

Failed tests

firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise

### Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

failed  1 failed

Details

stats  1 test across 1 suite
duration  49.9 seconds
commit  b740031
info  📦 Artifacts: View test results and HTML report
🔄 Run: #17645 (attempt 2)

Failed tests

firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise

### Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.1 seconds
commit  cfc68ac
info  🔄 Run: #17650 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.5 seconds
commit  cfc68ac
info  🔄 Run: #17650 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  55.1 seconds
commit  cfc68ac
info  🔄 Run: #17650 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  4.5 seconds
commit  cfc68ac
info  🔄 Run: #17650 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  34.3 seconds
commit  5d3d0dc
info  🔄 Run: #17651 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.8 seconds
commit  5d3d0dc
info  🔄 Run: #17651 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  52.8 seconds
commit  5d3d0dc
info  🔄 Run: #17651 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  58.4 seconds
commit  5d3d0dc
info  🔄 Run: #17651 (attempt 1)

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

@Zaimwa9 Zaimwa9 changed the title ci: raise db max connections for private cloude e2e ci: raise db max connections for private cloud e2e Jun 18, 2026
@Zaimwa9 Zaimwa9 changed the title ci: raise db max connections for private cloud e2e ci: raise db pg-max-connections for private cloud e2e Jun 18, 2026
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Jun 18, 2026
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Jun 18, 2026
@Zaimwa9 Zaimwa9 merged commit 8977abe into main Jun 18, 2026
38 of 39 checks passed
@Zaimwa9 Zaimwa9 deleted the ci/fix-connection-pool-limit branch June 18, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd Build, test and deployment related front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants